<?php /*a:2:{s:41:"theme/index/default/user/share_agent.html";i:1553153158;s:42:"theme/index/default/public/footer_nav.html";i:1553057732;}*/ ?>
<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<meta name="description" />
	<link rel="icon" href="/favicon.ico" type="image/x-icon" />
	<title>经销商分润管理系统</title> 

   	<link href="/theme/index/default/static/css/mui.min.css" rel="stylesheet"> 
    <link href="/theme/index/default/static/css/alertify.core.css" rel="stylesheet" type="text/css">
    <link href="/theme/index/default/static/css/alertify.default.css" rel="stylesheet" type="text/css">
    <link href="/theme/index/default/static/css/font-awesome.min.css" rel="stylesheet" /> 
	<link href="/theme/index/default/static/css/default.manager.css" rel="stylesheet" type="text/css" />
 	<link href="/theme/index/default/static/css/app.css" rel="stylesheet"/> 
    <link href="/theme/index/default/static/css/SkinConfig-Black.css" rel="stylesheet"  type="text/css"/> 
    <link href="/theme/index/default/static/css/user.css" rel="stylesheet"> 
    
    <script  type="text/javascript" src="/theme/index/default/static/js/jquery.2.1.4.min.js"></script>
   	<script  type="text/javascript" src="/theme/index/default/static/js/mtcache/mt.cache.js"></script>
   	<script  type="text/javascript" src="/theme/index/default/static/js/vue.min.js"></script>   
    <script type="text/javascript" src="/theme/index/default/static/js/lib/alertify.js"></script> 
	<script type="text/javascript" src="/theme/index/default/static/js/lib/jquery.qrcode.min.js"></script>  
    <script type="text/javascript"  src="/theme/index/default/static/js/lib/exif.js"></script> 
    <script type="text/javascript"  src="/theme/index/default/static/js/lib/mobileFix.mini.js"></script> 
    <script type="text/javascript"  src="/theme/index/default/static/js/mt.compress-1.1.js"></script> 
    <script type="text/javascript"  src="/theme/index/default/static/js/mui.min.js"></script>  

 	<script>
		var ajaxCacheTime = 30; 
 	</script>
</head>
<body id="app" class="mui-android mui-android-6 mui-android-6-0 mui-fullscreen" style="text-size-adjust: 100%;">
	<header class="mui-bar mui-bar-nav ">
        <span class="mui-icon mui-icon-back mui-pull-left"></span>
        <h1 class="mui-title title">代理授权</h1> 
    </header>
    <nav class="mui-bar mui-bar-tab">
		<a class="mui-tab-item mui-active" href="<?php echo url('user/index'); ?>">
			<span class="mui-icon fa fa-home"></span>
			<span class="mui-tab-label">首页</span>
		</a> 
		<a class="mui-tab-item" href="<?php echo url('user/userInfo'); ?>">
			<span class="mui-icon fa fa-drupal"></span>
			<span class="mui-tab-label">我的</span>
		</a>
    </nav>
    <script>
    mui.init(); 
    
    mui('body').on('tap','a',function(){
        window.top.location.href=this.href;
    });
    $(".mui-icon-back").click(function(){
    	history.go(-1);
    });
    </script>
    <div class="mui-content">   
		<ul class="mui-table-view">  
       		<li class="mui-table-view-cell">
           		<div class="mui-media-body">
					<strong><?php echo htmlentities($daili_info['dlname']); ?></strong>
                  	<p>授权号:<?php echo htmlentities($daili_info['sqh']); ?></p>
                   	<p>代理级别:<?php echo htmlentities($daili_info['dailijb']); ?></p>
                 	<p>状态:<?php if($daili_info['status'] == 1): ?>正常<?php else: ?>锁定<?php endif; ?></p>
				</div>
				<div class="mui-badge mui-badge-primary" id="yqxdl" style="position:absolute;right:1.3rem;top:42%;margin-top: -1rem;">
                	<span style="color:#ffffff;padding:0.8rem;line-height:1.5rem; ">邀请新代理</span> 
            	</div>
            	<div class="mui-badge mui-badge-purple" style="position: absolute;right:1.3rem;top: 69%;margin-top:0.1rem;">
                	<a href="<?php echo url('user/myXiaji'); ?>"><span style="color:#ffffff;padding:0.8rem;line-height:1.5rem; ">邀请记录</span> </a>
              	</div> 
              	<input type="hidden" name="dl_id" id="dl_id" value="<?php echo htmlentities(lock_url($daili_info['id'])); ?>"/>
              	<!-- 
               	<span class="mui-badge mui-badge-primary" style="position: absolute;right:20px;top: 50%;margin-top: -9px;">   
               		<a href=""><span style="color: #ffffff;padding:10px;line-height: 20px;">邀请新代理</span> </a>                                                             
              	</span> 
               	-->             
          	</li>        
		</ul>
    </div> 
    <div id="jingle_popup_mask" style="opacity: 0.1; display: none;"></div>
    
    <section id="alertify" class="alertify alertify-prompt" style="display:none">
    	<div class="alertify-dialog">
    		<div id="alertify-form">
    			<article class="alertify-inner">
    				<p class="alertify-message">分享</p>
    				<div class="alertify-text-wrapper">
    					<h5 class="mui-content-padded">选择分享下级级别</h5>
   						<select id="select_level">
   							<?php if(is_array($daili_info['ktjdj']) || $daili_info['ktjdj'] instanceof \think\Collection || $daili_info['ktjdj'] instanceof \think\Paginator): $i = 0; $__LIST__ = $daili_info['ktjdj'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
           					<option value="<?php echo htmlentities(lock_url($v['id'])); ?>"><?php echo htmlentities($v['levelname']); ?></option>
           					<?php endforeach; endif; else: echo "" ;endif; ?>  
    					</select>
     					<!--  
     					<h5 class="mui-content-padded">选择分享方式</h5>
   						<div class="mui-card"> 
  							<div class="mui-input-row mui-radio mui-left">
	 							<input name="SelectWeChatShareType" id="SelectWeChatShareType_0" type="radio" value="0" checked="">
     							<label for="SelectWeChatShareType_0">页面链接方式</label>
 	  						</div>  
    					</div>
     					-->
    				</div>
    				<nav class="alertify-buttons">
    					<button class="alertify-button alertify-button-cancel" id="alertify-cancel">取消</button>
    					<button type="button" class="alertify-button alertify-button-ok" id="alertify-ok">确定</button>
    				</nav>
    			</article>
    		</div> 
    	</div>
    </section>
    
    <div style="display: none"> 
	   	<script>
	          setTimeout(function () { 
	              document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust = "100%";  
	           }, 2000);  
	    </script> 
    </div>  
</body>
<script>
$(function(){
	//邀请新代理
	$("#yqxdl").click(function(){
		$("#alertify").show();
	});
	//关闭代理选择窗口
	$("#alertify-cancel").click(function(){
		$("#alertify").hide();
	});
	//生成分享链接
	$("#alertify-ok").click(function(){
		var dl_level = $("#select_level").val();
		var pid = $("#dl_id").val();
		var btn = ['取消', '确认']; 
		 
		var start_time = Date.parse(new Date()) / 1000;; 
		$.post("<?php echo url('user/lockUrl'); ?>",{parame:start_time},function(data){ 
			start_time = data;
		});
		$("#alertify").hide();
		mui.confirm('分享链接已生成，请分享给您的微信好友！', '系统提示', btn, function(e) {
			if(e.index == 0){
				
			}else{
				window.top.location.href = "/index.php/index/user/sharehaibao.html?dl_level="+dl_level+"&pid="+pid+"&start_time="+start_time;
			} 
		});
	});
})
</script>
</html>